#include"buffer.hpp"
#include"logger.hpp"
#include"server.hpp"
#include"connection.hpp"
void test_buffer()
{
    Buffer buffer;
    for(int i=0;i<300;i++){
        std::string str ="hello!!!!"+std::to_string(i)+'\n';
        buffer.WriteStringAndPush(str);
    }
    while(buffer.ReadAlbeSize()>0){
        std::cout<<buffer.GetLineAndPop()<<std::endl;
    }
    // std::cout<<buffer.ReadAsString_AndPop(buffer.ReadAlbeSize())<<std::endl;


    // Buffer buffer1;
    // buffer.WriteStringAndPush(str);
    // // std::string temp=buffer.ReadAsString_AndPop(buffer.ReadAlbeSize());

    // buffer1.WriteBufferAndPush(buffer);
    // std::string temp2=buffer1.ReadAsString_AndPop(buffer1.ReadAlbeSize());
    
    // // std::cout<<temp<<std::endl;
    // std::cout<<temp2<<std::endl;
    // std::cout<<buffer1.ReadAlbeSize()<<std::endl;
    // std::cout<<buffer.ReadAlbeSize()<<std::endl;

}
int main()
{   
    DLOG("%d%s",123,"asdasdas");
    return 0;
}